\begin{problem}{Distincter}{distincter.in}{distincter.out}{2 seconds}{}{}

     We are given an integer sequence of numbers. 
     In a single operation, we can either increment or decrement the 
     value of a single element by 1. Determine the 
     minimum number of operations we must perform before the 
     sequence contains at least $K$ distinct elements. 
Note that we can create negative elements during the process. 

\InputFile

The first line contains number of elements in sequence $N$ 
and an integer $K$ ($1\le K\le N\le 50$).
The second line contains space-separated sequence, its elements
are between 1 and 1000, inclusive. 

\OutputFile

Output the required number of operations.

\Example
\begin{example}
\exmp{
3 2
5 1 3
}{
0
}%
\exmp{
7 5
1 1 1 1 1 1 1
}{
6
}%
\end{example}

\end{problem}